cmake_minimum_required(VERSION 3.18)

project(function)

set(FUNCTION "1")

function(test)
message (STATUS ${FUNCTION})
# set(FUNCTION "2" )
set(FUNCTION "2" PARENT_SCOPE)
message (STATUS ${FUNCTION})   
endfunction(test)

test()
message (STATUS ${FUNCTION})
